﻿using UnityEngine;
using System.Collections;
using System.Linq;
using System.Text;

namespace Story
{

    public class DialogStateHide : DialogStateBase
    {

        public DialogStateHide(DialogState state, StoryDialogManager controller)
            : base(state, controller)
        {

        }

        public override void Enter()
        {
            float time = dialogManager.Hide();
            controller.StartCoroutine(Wait(time));
        }

        public IEnumerator Wait(float time)
        {
            yield return new WaitForSeconds(time);
            controller.SwitchState(DialogState.End);
        }
    }

}


